import { Language } from "../../../../extend/language/Language";
import { LoaderHelp } from "../../../common/display/LoaderHelp";
import { MarketTwoConfig } from "../../resource/MarketTwoConfig";
import { HotSellTextItem } from "./HotSellTextItem";
//class HotSellPanel
    
    export  class HotSellPanel /* flash.display.Sprite */
    {
        constructor()
        {
            
            this._hotSellInfoArr = [];
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            var loc3=null;
            var loc4=null;
            var loc5=0;
            this._twoTagNameArr = Language.getString(90260).split(",");
            this._bitmap = new Object /* flash.display.Bitmap */();
            this._bitmap.x = 20;
            this._bitmap.y = 0;
            addChild(this._bitmap);
            LoaderHelp.setBitmapdata("HotSellLogo.swf", this._bitmap);
            var loc1=110;
            var loc2=0;
            loc5 = 0;
            while (loc5 < this._twoTagNameArr.length) 
            {
                if (loc4 = MarketTwoConfig.instance.getIndexSellInfoByName(this._twoTagNameArr[loc5])) 
                {
                    loc3 = new HotSellTextItem(loc4);
                    loc3.x = loc1;
                    loc3.y = loc2;
                    loc1 = loc1 + 90;
                    addChild(loc3);
                    if (loc5 == 3) 
                    {
                        loc1 = 110;
                        loc2 = loc2 + 28;
                    }
                }
                ++loc5;
            }
            return;
        }

        /* internal */ /* var */_bitmap: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_twoTagNameArr: Array<any>;

        /* internal */ /* var */_hotSellInfoArr: Array<any>;
    }
